<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div>This is content, and data is: <span id="data"></span></div>
    <button id="btn">click me</button>
    <script>
        var index = 0;
        function doRequest () {
            fetch('/data', {
                headers: {
                    'X-Test-Cache': index++
                }
            }).then(function (res) {
                console.log(res,'res')
                return res.text()
            }).then(function (text) {
                document.getElementById('data').innerText(text)
            })
        }
        document.getElementById('btn').addEventListener('click', doRequest)
    </script>
</body>
</html>